(WIP) Filter and GroupBy Transforms#859
(WIP) Filter and GroupBy Transforms#859timelyportfolio wants to merge 9 commits intoplotly:masterfrom
Conversation
…ster `filter` with plotly
|
@chriddyp would you mind testing this out in the plot.ly workspace? |
| @@ -129,6 +158,30 @@ function getFilterFunc(opts) { | |||
| return function(v) { return v < value; }; | |||
| case '>': | |||
| return function(v) { return v > value; }; | |||
There was a problem hiding this comment.
does this work for datetime strings too?
There was a problem hiding this comment.
will try to get an example up, but yes it does work with datetime strings. It does not seem to work though with Date and datetime strings.
Sounds good. I'm thinking the filter functions should respect the (maybe autotyped) axis types for data arrays that have a corresponding axis (e.g. I'm thinking that the var data = [{
x: ['A', 'B', 'D'],
transforms: [{
type: 'filter',
operation: '>',
value: 'B'
}]
}]
Plotly.plot(gd, data);
gd._fullData[0].x // => ['D']
That sounds a bit odd. Why would anyone filter a trace with no
|
|
made obsolete by #936 |

This pull makes the
filtertransform an actual part of Plotly and builds on the very finetransformwork by @etpinard. The first filters available will be=,>,<,in,notin,within,notwithin(name changes welcome).groupbyto this pull